﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Function
{
    public partial class FunctionForm : Form
    {
        bool isMouseDown = false;

        public FunctionForm()
        {
            InitializeComponent();
        }

        public FunctionForm(Form Index) {
            InitializeComponent();
        }

        private void label1_DoubleClick(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void label1_MouseDown(object sender, MouseEventArgs e)
        {
            isMouseDown = true;
        }

        private void label1_MouseUp(object sender, MouseEventArgs e)
        {
            isMouseDown = false;
        }

        private void label1_MouseMove(object sender, MouseEventArgs e)
        {
            if (isMouseDown)
            {
                this.Left += e.X;
                this.Top += e.Y;
            }
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            this.TopMost = true;
            label1.Text = DateTime.Now.ToString("HH:mm:ss");
        }

        private void Time_Load(object sender, EventArgs e)
        {
            timer1_Tick(sender, e);
        }
    }
}
